<?php namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;

abstract class Controller extends BaseController {

	use DispatchesCommands, ValidatesRequests;

	public function __construct()
	{
		$tmp = explode('\\', \Route::currentRouteAction());
		$route = explode('@', $tmp[sizeof($tmp)-1]);
		$GLOBALS['controller'] =  $route[0];
		$GLOBALS['action'] =  $route[1];
	}
}
